home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / TGCBOR20.ARJ / INTROPAK.COM / TWSIMPLE.C < prev    next >
C/C++ Source or Header  |  1991-07-10  |  1KB  |  56 lines

  1.  
  2. #include "teglsys.h"
  3.  
  4. void simplewindow(void)
  5.   {
  6.     winframeptr wf;
  7.  
  8.     twinit(&wf,10,10,300,120);
  9.     twsetheader(wf,"A Simple window");
  10.     twdrawwindowframe(wf);
  11.   }
  12.  
  13. void startup(void)
  14.   {
  15.  
  16. /*  Optional Startup. Forcing a Video Mode           */
  17. /*  Note: Use either tweasystart() or teglinit(). NOT both */
  18. /*                               */
  19.  
  20.     registertgidriver(GRCGABW_driver);
  21.     registertgidriver(GRVGA256_driver);
  22.     registertgidriver(GREVGA16_driver);
  23.     setstandardheapsize(20000l); /* Reserve about 20k for Video Drivers */
  24.     twcommoninit();
  25.     /* just use one of the following lines */
  26.  
  27.     teglinit(videoautodetect(),12288l);
  28.     /*  teglinit("CGA640x200x2", 12288l); */
  29.     /*  teglinit("EGA640x350x16",12288l); */
  30.     /*  teglinit("VGA640x480x16",12288l); */
  31.     /*  teglinit("VGA320x200x256",12288l); */
  32.     /*  teglinit("SVGA800x600x16",12288l);    */
  33.     /*  teglinit("SVGA640x480x256",12288l);  */
  34.     /****************************************/
  35.     clearteglscreen();
  36.     seteasyfont(font14);
  37.     easyout();
  38. }
  39. void main(void)
  40.     {
  41.     /*tweasystart*/
  42.     startup(); /* see above */
  43.  
  44.     setrgbpalette(240,0,0,0);
  45.     setrgbpalette(255,63,63,63);
  46.  
  47.  
  48.     setautorotate(TRUE);
  49.     setkeyboardmouse(FALSE);
  50.  
  51.     simplewindow();
  52.     teglsupervisor();
  53.  
  54.   }
  55.  
  56.